<!DOCTYPE html>
<html>
<head>
  <title>Swagger UI</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui.css">
</head>
<body>
  <div id="swagger-ui"></div>
  <script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui-standalone-preset.js"></script>
  <script>
    window.onload = function () {
      const initializeSwaggerUI = async () => {
        const ui = SwaggerUIBundle({
          url: "/swagger.json",
          dom_id: "#swagger-ui",
          presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
          layout: "StandaloneLayout",
          requestInterceptor: (request) => {
            request.headers["X-Frappe-CSRF-Token"] = null;
            return request;
          },
        });
        window.ui = ui;
      };
      initializeSwaggerUI();
    };
  </script>
</body>
</html>